from django.urls import path
from .views import index, account, homeSpace, sharedSpace, editView, userCenter

urlpatterns = [
    path('', index.index),

    path('home', homeSpace.index, name='home'),
    path('home/upload', homeSpace.upload, name='homeUpload'),
    path('home/download',homeSpace.download,name='homeDownload'),
    path('home/delete',homeSpace.delete,name='homeDelete'),
    path('home/search',homeSpace.search,name='homeSearch'),
    path('home/detailDirs/<str:item>', homeSpace.detailDirs, name='homeDetailDirs'),
    path('home/edit', homeSpace.editFile, name='homeEdit'),

    path('shared', sharedSpace.index, name='shared'),
    path('shared/upload', sharedSpace.upload, name='sharedUpload'),
    path('shared/download',sharedSpace.download,name='sharedDownload'),
    path('shared/search',sharedSpace.search,name='sharedSearch'),
    path('getpath', sharedSpace.getPath, name='getPath'),
    path('shared/detailDirs/<str:item>', sharedSpace.detailDirs, name='sharedDetail'),

    path('account', account.index,name='account'),
    path('account/logout', account.logout, name='logout'),
    path('account/process', account.process, name='process'),
    path('account/sms',account.send_sms,name='send_sms'),
    path('user', userCenter.index, name='user'),
    path('user/get', userCenter.getInfo, name='userGet'),
    path('user/save', userCenter.saveInfo, name='userSave'),
    path('user/makeOrder', userCenter.makeOrder, name='makeOrder'),
    path('<str:condition>/doc/content', editView.queryContent, name='editContent'),
    
    path('<str:condition>/doc/save', editView.saveContent, name='editSave'),
    path('<str:condition>/doc/<str:mode>/<int:ID>', editView.index, name='editView')
]
